package leetcode.jianzhioffer;

/**
 * @program: datastructureandalogorithm
 * @description:
 * @author: hmx
 * @create: 2021-10-27 11:31
 **/
public class JianZhiOffer06 {

    /*public int[] reversePrint(ListNode head) {
        //用栈来存储链表的值，当出栈时，顺序即为倒序的
        Deque<Integer> stack = new LinkedList<>();
        while (head!= null) {
            stack.push(head.val);
            head = head.next;
        }
        //用来存储返回结果
        int[] result = new int[stack.size()];
        //指向数组当前位置
        int index = 0;
        while (!stack.isEmpty()) {
            result[index++] = stack.pop();
        }
        return result;
    }*/


}
